//
//  MTAssetsAlbum.swift
//  TA
//
//  Created by M on 2019/12/11.
//  Copyright © 2019 m. All rights reserved.
//

import Foundation
import Photos

public class MTAssetAlbum: NSObject {
    
    /// 相册 PHAsset 资源
    public var result: PHFetchResult<PHAsset>
    
    /// 相册资源数量
    public var sourceCount: Int {
        return result.count
    }
    
    /// 相册子类型
    public var collectionSubtype: PHAssetCollectionSubtype
    
    /// 相册名字
    public var name: String?
    
    /// 是否相机胶卷
    public var isCameraRoll: Bool = false

    /// 图片资源
    public var assets: [MTAsset]?
    
    init(name: String?, result: PHFetchResult<PHAsset>, collectionSubtype: PHAssetCollectionSubtype) {
        self.result = result
        self.collectionSubtype = collectionSubtype
        super.init()
        self.name = name
    }
    
}
